home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 May / Macworld (1999-05).dmg / Shareware World / Utilities / Data & Time / Troi-Serial-Plug-in1.0 / SendReci.fp3 (.txt) < prev    next >
FileMaker Pro Database  |  1999-02-23  |  58KB  |  495 lines

  1.  Copyright 1984-1998 FileMaker, Inc. 
  2. HBAM2016AUG95
  3. Pro 3.0
  4. alisA
  5. alisA
  6. LISTA
  7. HBAM3016AUG95@
  8. 2STR 
  9. >vers
  10. JSTR#
  11. bFNET
  12. ncfrg
  13. Timeouts
  14. YO/<CNFG?<
  15.  _&HUO
  16. 1st Quarter
  17. 2nd Quarter
  18. 3rd Quarter
  19. 4th Quarter
  20. 2/23/99
  21. CPORTNAMES
  22. CVERSION
  23. GACKMESSAGE
  24. GADVANCEDFLOWCONTROL
  25. d    GDATABITS
  26. GERRORCODE
  27. GFLOWCONTROL
  28. GMESSAGE
  29. GMESSAGEID
  30. GMESSAGERECEIVED
  31. GMESSAGESEND
  32. GMESTEXT
  33. GNUMBER
  34. GPARITY
  35. a    GPORTNAME
  36. GSPEED
  37. W    GSTOPBITS
  38. GTEMPRESULTRECEIVED
  39. MESEQUAL
  40. MESRECEIVED
  41. [    MESTOSEND
  42. gNumberB
  43. cVersionB
  44. |("Serial-Version"
  45. Serial-Version
  46. he answer to everything is 42The answer to everything is 42The answer to everything is 42The answer to everything is 42The answer to everything is 42The answer to everything 0000000000
  47. baud=57600
  48. hgjhjgggj236
  49. Modem Port
  50. stop=10
  51. data=8
  52. parity=none
  53. flowControl=XOnXOff
  54. Send/Receive
  55. Preferences
  56. MenuB
  57. gErrorCodeB
  58. gAckMessageB
  59. gMesTextB
  60. gMessageB
  61. cPortNamesB
  62. |("Serial-GetPortNames"
  63. Serial-GetPortNames
  64. gMessageIDB
  65. gSpeedB
  66. gMessageSendB
  67. gMessageReceivedB
  68. ZA    mesToSendB
  69. mesReceivedB
  70. mesequalB
  71. ]A    gPortNameB
  72. gTempResultReceivedB
  73. _A    gStopBitsB
  74. `A    gDataBits
  75. gParityB
  76. trueB
  77. gFlowControlB
  78. gAdvancedFlowControlB
  79. Send/ReceiveB
  80. To Send and Receive Demo\
  81.  1999, Troi Automatisering
  82. kWith this file you can send data out from one computer (the sender) to another computer (the receiver) via a serial cable. 
  83. The sender script will start to send the field mesToSend to the serial port data.
  84. The receiver script will receive all the data and put it into the field mesReceived. After receiving all data the receiving script will compare the 2 fields.
  85. Sending and Receiving
  86. Set Port Preferences
  87. To Main Menu
  88. PreferencesB
  89. error codeo
  90. To Menup
  91. Sending and Receivingu
  92. 3a receiver
  93. x    mesToSend
  94. mesReceived
  95. mesequal
  96. 2 - open port
  97.     3b sender
  98. 1- set preferences
  99. -then press this button on the sender computer
  100. 1press this button first on the receiving computer
  101. Z!THIS IS A TEST
  102. dit is een test 
  103. test 2
  104. This is some sample text.
  105. The Troi Serial Plug-in adds the following functions:
  106. function name            short description
  107. Serial-Version            check for correct version of the plug-in
  108. Serial-GetPortsNames    returns the names of all serial ports that are available on the computer
  109. Serial-Open            opens a serial port
  110. Serial-Close            closes a serial port
  111. Serial-Receive            receives data from a serial port
  112. Serial-Send            send data to a serial port
  113. Serial-SetDispatchScript    tell the plug-in which script to call whB
  114. en data is received    
  115. Serial-DataWasReceived    returns if data was received on a open port
  116. Serial-RestoreSituation    tell the plug-in to bring the original file back to the front
  117. To Send/Receive Menu
  118. speed
  119.     port name
  120.     stop bits
  121.     data bits
  122. parity
  123. standard flow control
  124. advanced flow control
  125. )Only use advanced control if you need to.
  126. flow control
  127. Set Serial Port Preferences
  128. This is some sample text.
  129. Serial-Open
  130. Syntax    Set Field[ gErrorCode, External("Serial-Open" , "portname | switches ") ]
  131. Opens a serial port with this name and the specified parameters.
  132. Parameters 
  133.     portname: the name of the port to open
  134.     switches:     (optional) specifies the setting of the port like the speed of the port etc.
  135. Result
  136. Returned result is an error code: 
  137.     0         no error 
  138.     $$-50      paramErr              There was an error with the parameter
  139.     $$-108      memFullErr          Ran out of memory
  140. 97    portInUse            Could not open port, the port is in use    
  141.     $$-4210    portDoesnotExistErr    A serial port with this name is not available on this computer
  142.     $$-4211    AllPortsNullErr        No serial ports are available on this computer
  143. Other errors might be returned.
  144. Example usage
  145.     Set Field[ gErrorCode, External("Serial-Open" , "COM2 | baud=19200") ]
  146. will open the COM2 port with a speed of 19200 baud.
  147. Specifying the port settings
  148. Default port settings
  149. A serial port can be configured in a lot of
  150. This is some sample text.
  151. Using external functions
  152. External functions for this plug-in can be used in a script step using a calculation. The external functions should not be used in a define field calculation.
  153. IMPORTANT  The Balance functions have to be used in a specific way, to create the desired effect. See the section on Balance functions for the specifics on this.
  154. Serial-Version
  155. Example usage: External(Serial-Version; "") will return "Troi Serial Plug-in 1.0b1".
  156. IMPORTANT You shB
  157. ould always check if the plug-in is loaded, by using this function. If the plug-in is not loaded use of external functions may result in unexpected result or data loss, as FileMaker will return an empty field to any external function that is not loaded.
  158. dfgdfdfdfd
  159. To Main Menu
  160. To Menu
  161. To Preferences
  162. ----- General ------
  163. %Check  for Presence of Serial plug-in
  164. ----- SERIAL PORT ------
  165. Open Serial Port
  166. Receiver
  167. *Receive Data in global gTempResultReceived
  168. Sender
  169. Close Serial Port
  170. %Check records for transmission errors
  171. Wait a sec
  172. ----- Misc ------
  173.     Open file
  174.   Set all globals
  175.  #  Check  for existence of gPortName
  176. BeepBeep
  177. Set Dispatch Script
  178. Handle Data Received
  179. Reset Dispatcher Script
  180.  ways. These settings can be set by specifying switches. If you don't specify any switches the port is initialised to the following settings: a speed of 9600 baud, no parity, 8 data bits, 1 stop bit, no handshaking. If you want to use this setting open the port like this:
  181.     Set Field[gErrorCode, External("Serial-Open", "COM2") ]
  182. Specifying other port settings
  183. It is recommended that you set the port settings explicitly.. Give the settings by concatenating the desired settings keywords. Y
  184. ~ou specify them like this:
  185.     Set Field[gErrorCode, External("Serial-Open", 
  186.                        "COM2 | baud=9600 parity=none data=8 stop=10 flowControl=XOnXOff") ]
  187. You can set the speed, the parity, the number of data and stopbits, and the handshaking to use. Note that the order of the keywords and case are ignored. All keywords are optional and should be separated by a space or a return.
  188.     Helvetica
  189. Geneva
  190. Arial
  191. Times New Roman
  192. Monaco
  193. Courier
  194. Times
  195. Futura
  196. Courier New
  197. Palatino
  198. Minion Web
  199. New York
  200. AppleGaramond Bk
  201. AppleGaramond Lt
  202. Open Serial Port
  203. Open the serial portB!
  204. ] = ""
  205. Cancelm
  206. mFirst select a valid port name.D
  207. |("Serial-Open"
  208. ] & "|"  & 
  209. W & " " & 
  210. _ & " " & 
  211. ` & " " & 
  212. a &  " "& 
  213. Serial-Open
  214.  <> 0
  215.  = "$$-97"
  216. $$-97
  217. Cancelm
  218. mThis port is in use.
  219.  = "$$-4210"
  220. $$-4210
  221. Cancelm
  222. mThis portname does not exist.Jw
  223. Cancelm
  224. mAn error occurred
  225. To Main Menu
  226. |("Serial-DataWasReceived"
  227. Serial-DataWasReceived
  228. ----- SERIAL PORT ------
  229. A%Check  for Presence of Serial plug-in
  230.     A4Important: ALWAYS check if the plug-in is available!B)Check if this is FileMaker 4.0 or higher.CQ
  231.  1)) < 4    
  232. Canceld
  233. This file requires FileMaker 4.0 or higherE/Check if the Troi Grabber Plug-in is available.F|
  234. |("Serial-Version"
  235.  "") 
  236.  14 ) <> "Serial Plug-in"
  237. Serial-Version
  238. Serial Plug-in
  239. ) = 1    
  240. Canceld
  241. The Serial Plug-in not found. 
  242. Please put The Serial Plug-in into the Extensions folder inside the FileMaker folder. Also enable all the plug-ins under the application preferences.
  243. Canceld
  244. The Serial Plug-in not found. Please put the this Plug-in into the SYSTEM directory inside the FileMaker directory. 
  245. Also enable all the plug-ins under the application preferences.
  246.   Set all globals
  247. |("Troi-Set Default Separator"
  248.  "|")
  249. Troi-Set Default Separator
  250.  A    Open file
  251. ) = 2    
  252. ----- General ------
  253. ----- Misc ------
  254. BeepBeep
  255. Close Serial Port
  256. Open the serial portB<
  257. |("Serial-Close"
  258. Serial-Close
  259. Sender
  260. |("Serial-Send"
  261. ] & "|" & 
  262. Z & "##END")
  263. Serial-Send
  264. ##END
  265.  <> 0
  266. Cancelm
  267. mAn Error occurredD@
  268.  10) = 0    
  269. Receiver
  270. """"""
  271. 333333
  272. DDDDDD
  273. UUUUUU
  274. ffffff
  275. wwwwww
  276. OKatisering
  277. NDScherm reparatie
  278. Cancelorganiseren:
  279. naam bestand: 
  280. B5300 schermreparatie##ENDDear MiClick on ok and then start the sending computer...D$
  281.  "##END"
  282. ##END
  283.  - 1)
  284. A%Check records for transmission errors
  285. ) = 0    
  286. Cancel
  287. No errors in transmission.C
  288. Cancel
  289. There were errors in transmission.
  290. To Preferences
  291. Set Dispatch Script
  292. |("Serial-SetDispatchScript"
  293. ) & "| scriptkey=1")
  294. Serial-SetDispatchScript    
  295. | scriptkey=1
  296. Handle Data Received
  297. |("Serial-RestoreSituation"
  298. Serial-RestoreSituation
  299. A*Receive Data in global gTempResultReceived
  300. |("Serial-Receive"
  301. Serial-Receive
  302.  2 ) = "$$"
  303. ^ = "$$-28"
  304. $$-28
  305. Cancel
  306. Open the port firstE-
  307. ^ = "$$-207"
  308. $$-207
  309. Cancel
  310. Buffer overflow error.Gx
  311. Cancel
  312. An error occurred!
  313. Reset Dispatcher Script
  314. |("Serial-SetDispatchScript"
  315.   "")
  316. Serial-SetDispatchScript
  317. A#  Check  for existence of gPortName
  318. A&Check if the port in the global existsBs
  319. |("Serial-GetPortNames"
  320. ] & "
  321. ") = 0
  322. Serial-GetPortNames
  323. Canceld
  324. The portname as specified in the global gPortName does not exist. Do you want to change the preferences now?D*
  325. ) =1    
  326. To Menu
  327. Wait a sec
  328. A$This scripts adds a bit of a wait...B9... 1/6 of a sec, or 1 sec  depending on the presense ...C
  329. ... of the Dialog plug-in.
  330. |("TrDl-Version"
  331.   "") 
  332.  19 ) = "Troi Dialog Plug-in"
  333. TrDl-Version
  334. Troi Dialog Plug-in
  335. |("TrDl-DelayTicks"
  336.  "10")
  337. TrDl-DelayTicks
  338. HRPTH
  339. FPTHAHKES:Projecten:Troi FM Plug-In:GRAB:Troi-Grabber-Plug-in1.0a1:StudReg.fp3
  340. MSPCA
  341. NAMEA
  342. StudReg.fp3
  343. RPTHA
  344. StudReg.fp3
  345. StudReg.fp3
  346. FMP3FMP3
  347. Troi-Grabber-Plug-in1.0a1
  348. HKES:Projecten:Troi FM Plug-In:GRAB:Troi-Grabber-Plug-in1.0a1:StudReg.fp3
  349. Ethernet zone
  350. McGee
  351. peter
  352. PRPTH
  353. FPTHAPKES:Projecten:Troi FM Plug-In:GRAB:Troi-Grabber-Plug-in1.0a1:samples:StudReg.fp3
  354. MSPCA
  355. NAMEA
  356. StudReg.fp3
  357. RPTHA
  358. :samples:StudReg.fp3
  359. ONML""
  360. ONML""
  361. ONML""
  362. NRPTH
  363. FPTHANKES:Projecten:Troi FM Plug-In:GRAB:Troi-Grabber-Plug-in1.0b1:docs:Overview.fp3
  364. MSPCA
  365. NAMEA
  366. Overview.fp3
  367. RPTHA
  368. :docs:Overview.fp3
  369. Overview.fp3
  370. FMP3FMP3
  371. NKES:Projecten:Troi FM Plug-In:GRAB:Troi-Grabber-Plug-in1.0b1:docs:Overview.fp3
  372. Ethernet zone
  373. McGee
  374. peter
  375. \RPTH
  376. FPTHA\KES:Projecten:Troi Plug-In 981215:Troi Plug-ins:SERIAL:Troi-Serial-Plug-in1.0b1:Portname.fp3
  377. MSPCA
  378. NAMEA
  379. Portname.fp3
  380. RPTHA
  381. Portname.fp3
  382. StudReg.fp3
  383. FMP3FMP3
  384. samples
  385. PKES:Projecten:Troi FM Plug-In:GRAB:Troi-Grabber-Plug-in1.0a1:samples:StudReg.fp3
  386. Ethernet zone
  387. McGee
  388. peter
  389. \RPTH
  390. FPTHA\KES:Projecten:Troi Plug-In 981215:Troi Plug-ins:SERIAL:Troi-Serial-Plug-in1.0b1:SeriExpl.fp3
  391. MSPCA
  392. NAMEA
  393. SeriExpl.fp3
  394. RPTHA
  395. SeriExpl.fp3
  396. SeriExpl.fp3
  397. FMP3FMP3
  398. Troi-Serial-Plug-in1.0b1
  399. \KES:Projecten:Troi Plug-In 981215:Troi Plug-ins:SERIAL:Troi-Serial-Plug-in1.0b1:SeriExpl.fp3
  400. McGee
  401. peter
  402. (LIST
  403. Portname.fp3
  404. FMP3FMP3
  405. Troi-Serial-Plug-in1.0b1
  406. \KES:Projecten:Troi Plug-In 981215:Troi Plug-ins:SERIAL:Troi-Serial-Plug-in1.0b1:Portname.fp3
  407. Ethernet zone
  408. McGee
  409. peter
  410. (LIST
  411. VDEFA(
  412. (LIST
  413. LISTA
  414. stop=10
  415. stop=15
  416. stop=20
  417. VDEFA(
  418. (LIST
  419. LISTA
  420. data=5
  421. data=6
  422. data=7
  423. data=8
  424. VDEFA(
  425. (LIST
  426. LISTA"parity=none
  427. parity=odd
  428. parity=even
  429. VDEFA(
  430. (LIST
  431. LISTA:flowControl=DtrDsr
  432. flowControl=RtsCts
  433. flowControl=XOnXOff
  434. VDEFA(
  435. (LIST
  436. LISTA
  437. inputControl=DTR
  438. outputControl=DSR
  439. DTR=enabled
  440. DTR=disabled
  441. inputControl=RTS
  442. outputControl=CTS
  443. RTS=enabled
  444. RTS=disabled
  445. inputControl=XOnXOff
  446. outputControl=XOnXOff
  447. VDEFA(
  448. speedsH
  449. portsI    stop bits
  450. LISTA
  451. baud=150
  452. baud=300
  453. baud=600
  454. baud=1200
  455. baud=1800
  456. baud=2400
  457. baud=3600
  458. baud=4800
  459. baud=7200
  460. baud=9600
  461. baud=14400
  462. baud=19200
  463. baud=28800
  464. baud=38400
  465. baud=57600
  466. VDEFA(
  467. FMRLA
  468. Portname
  469. J    data bitsK
  470. parityL
  471. basic flow controlM
  472. advanced flow control
  473. Pro 3.0 - 4.0F!
  474. Pro 3.0 - 4.0M1
  475. zondag
  476. maandag
  477. dinsdag
  478. woensdag
  479.     donderdag
  480. vrijdag
  481. zaterdag
  482. januari
  483. februari
  484. maart
  485. april
  486. augustus
  487.     september
  488. oktober
  489. november
  490. december
  491. 1st Quarter
  492. 2nd Quarter
  493. 3rd Quarter
  494. 4th Quarter
  495.